home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19950528-19950726 / 000074_news@columbia.edu_Tue Jun 6 17:16:55 1995.msg < prev    next >
Internet Message Format  |  2020-01-01  |  2KB

  1. Received: from apakabar.cc.columbia.edu by watsun.cc.columbia.edu with SMTP id AA14445
  2.   (5.65c+CU/IDA-1.4.4/HLK for <kermit.misc@watsun.cc.columbia.edu>); Tue, 6 Jun 1995 13:17:02 -0400
  3. Received: by apakabar.cc.columbia.edu id AA13527
  4.   (5.65c+CU/IDA-1.4.4/HLK for kermit.misc@watsun); Tue, 6 Jun 1995 13:16:59 -0400
  5. Path: news.columbia.edu!watsun.cc.columbia.edu!fdc
  6. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  7. Newsgroups: comp.protocols.kermit.misc
  8. Subject: Re: command line parameters and C-Kermit
  9. Date: 6 Jun 1995 17:16:55 GMT
  10. Organization: Columbia University, New York City
  11. Lines: 43
  12. Message-Id: <3r22i7$d6j@apakabar.cc.columbia.edu>
  13. References: <3r0iij$ffc@detroit.freenet.org>
  14. Nntp-Posting-Host: watsun.cc.columbia.edu
  15. Apparently-To: kermit.misc@watsun.cc.columbia.edu
  16.  
  17. In article <3r0iij$ffc@detroit.freenet.org>,
  18. Marc Zuckman <ak434@detroit.freenet.org> wrote:
  19. >Is there a command line switch that will prevent C-kermit
  20. >from hanging up the line after a file transfer operation
  21. >is performed.
  22. >
  23. >I am using another communications program (minicom 1.71)
  24. >on a Linux system.  minicom calls kermit with a command
  25. >line that looks like this for an upload:
  26. >
  27. >kermit -i -l /dev/ttyS0 -b 9600 -s uploadfilename
  28. >
  29. >As soon as the file transfer completes, kermit hangs up the 
  30. >line, and exits back to minicom.
  31. >
  32. Right.  When any UNIX program exits, all of the files that
  33. it opened are closed automatically.  That's a feature of UNIX.
  34.  
  35. The command-line option "-l /dev/ttyS0" tells Kermit to open
  36. /dev/ttyS0, and so it will be closed, and therefore also hung
  37. up when Kermit exits.
  38.  
  39. In fact, I am surprised that Kermit will even open the device,
  40. since, presumably, minicom already has it open and therefore,
  41. also presumably, has it "locked", which is supposed to prevent
  42. any other program from opening it at the same time.
  43.  
  44. The solution to both of these problems is to give Kermit the
  45. file descriptor for the already-open device, instead of a
  46. device name.  I don't know anything about minicom, but I expect
  47. that it must have a way of passing this information to
  48. external protocols, otherwise how could it possibly run them?
  49.  
  50. The file descriptor is a small integer.  When Kermit gets an
  51. integer as the argument to the "-l" option, it simply uses it
  52. as a file descriptor, and does not make any effort to close it
  53. upon exit.
  54.  
  55. Example:
  56.  
  57.   kermit -i -l 4 -b 9600 -s uploadfilename
  58.  
  59. - Frank